package com.lxh.abstractfactory;

/**
 * 抽象工厂模式
 * Create by lxh on 2020/2/8
 */
public class Main {
    public static void main(String[] args) {

        // 画红色矩形
        AbstractFactory factory = new RedRectangleFactory();
        factory.createShape().draw();
        factory.createColor().fill();

        // 画绿色圆形
        AbstractFactory factory1 = new GreenCircleFactory();
        factory1.createShape().draw();
        factory1.createColor().fill();
    }
}
